﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using BLToolkit.Mapping;
using BLToolkit.DataAccess;
using Entities.Admin;

namespace Entities.ThuQuy
{
    public class HoaDon: BaseEntity<HoaDon>
    {
        [MapField("MaHD"), PrimaryKey]
        public string MaHD { get; set; }
        public int MaLoai { get; set; }
        public DateTime NgayLap { get; set; }
        [MapField ("NguoiLap")]
        public string IdNguoiLap { get; set; }
        [MapIgnore]
        public string TenNguoiLap { 
            get
            {
                NhanVien nv = NhanVien.Objects.GetById(IdNguoiLap);
                if(nv!=null)
                    return nv.TenNhanVien;
                else return "";
                }
        }
    
    }
}
